package com.cnhis.cloudhealth.clinical.hosdoctor.inpatients.bo;

import com.cnhis.cloudhealth.clinical.hosdoctor.inpatients.dao.InpatientsDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.MySqlUtil;
import com.cnhis.cloudhealth.commons.utils.Page;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;
import org.apache.commons.collections.MapUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

/**
 * Created by xiezhenyuan on 2016/3/24.
 */
@Service
public class InpatientsBo {
    @Resource
    private InpatientsDao inpatientsDao;

    public ModelVo selectFieldSetting(){
        return MySqlUtil.packModelVo("Inpatients.7726",null,inpatientsDao);
    }
    public ModelVo selectChargeMode(){
        return MySqlUtil.packModelVo("Inpatients.7353",null,inpatientsDao);
    }
    public ModelVo selectPathManner(){
        return MySqlUtil.packModelVo("Inpatients.12064",null,inpatientsDao);
    }
    public ModelVo selectAreaAndDep(Map map){
        return MySqlUtil.packModelVo("Inpatients.871",map,inpatientsDao);
    }
    public ModelVo selectPathExecuter(){
        return MySqlUtil.packModelVo("Inpatients.12078",null,inpatientsDao);
    }
    public ModelVo selectPublicParameter(Map map){
        return MySqlUtil.packModelVo("Inpatients.6429",map,inpatientsDao);
    }
    public ModelVo selectJobZone(Map map){return MySqlUtil.packModelVo("Inpatients.1334",map,inpatientsDao);}
    public ModelVo selectUserWinPerm(Map map){return MySqlUtil.packModelVo("Inpatients.1478",map,inpatientsDao);}
    public ModelVo selectPLimtTime(Map map){return MySqlUtil.packModelVo("Inpatients.7274",map,inpatientsDao);}
    public ModelVo selectPnotpay(Map map){return MySqlUtil.packModelVo("Inpatients.880",map,inpatientsDao);}
    public ModelVo selectPhosno(Map map){return MySqlUtil.packModelVo("Inpatients.4185",map,inpatientsDao);}
    public ModelVo selectPcondition(Map map){return MySqlUtil.packModelVo("Inpatients.1333",map,inpatientsDao);}
    public ModelVo selectPnameandinput(Map map){return MySqlUtil.packModelVo("Inpatients.6906",map,inpatientsDao);}
    public ModelVo selectPselfdef(Map map){return MySqlUtil.packModelVo("Inpatients.selfdef",map,inpatientsDao);}

    public ModelVo selectPatientList(Map map,int pageno,int pagesize){
        return MySqlUtil.packModelVoPage("Inpatients.878",map,pageno,pagesize,inpatientsDao);
    }
    public ModelVo selectPatientcount(Map map){
        Integer pType = MapUtils.getInteger(map,"pType",0);
        if(pType==0){
            return MySqlUtil.packModelVo("Inpatients.878tcount",map,inpatientsDao);
        }else{
            return MySqlUtil.packModelVo("Inpatients.7686count",map,inpatientsDao);
        }
    }
    public ModelVo selectOldPatientList(Map map,int pageno,int pagesize){
        return MySqlUtil.packModelVoPage("Inpatients.7686",map,pageno,pagesize,inpatientsDao);
    }
    public ModelVo selectPatientBedList(Map map,int pageno,int pagesize){
        return MySqlUtil.packModelVoPage("Inpatients.882",map,pageno,pagesize,inpatientsDao);
    }


}
